import http from "../utils/request";

export default {
  //获取列表信息benchmark
  getCategory(){
    return http.get(window.VUE_APP_BASE_URL+`BenchmarkController/getCategory`)
  },
  //删除列表信息benchmark
  deleteCategory(id){
    return http.delete(window.VUE_APP_BASE_URL+`BenchmarkController/deleteCategory?id=${id}`)
  },
  //添加列表信息benchmark
  addCategory(params){
    return http.post(window.VUE_APP_BASE_URL+`BenchmarkController/addCategory`,{
      mark:params.mark,
      name:params.name,
      pid:params.pid,
    })
  },
  // 编辑分类目录benchmark  
  updateCategory(data){
    // console.log(params)
    return http.put(window.VUE_APP_BASE_URL+`BenchmarkController/updateCategory`,data)
  },
  //查看内容benchmark
  checkContent(id){
    return http.get(window.VUE_APP_BASE_URL+`BenchmarkController/checkContent?type=${id}`)
  },
  //编辑内容benchmark
  editContent(params){
    return http.post(window.VUE_APP_BASE_URL+`BenchmarkController/editContent`,{
      content:params.content,
      type:params.id,
    })
  },
    //获取列表信息about
    AgetCategory(){
      return http.get(window.VUE_APP_BASE_URL+`AboutController/getCategory`)
    },
    // 编辑分类目录benchmark  
    AupdateCategory(data){
      // console.log(params)
      return http.put(window.VUE_APP_BASE_URL+`AboutController/updateCategory`,data)
    },
    //删除列表信息about
    AdeleteCategory(id){
      return http.delete(window.VUE_APP_BASE_URL+`AboutController/deleteCategory?id=${id}`)
    },
    //添加列表信息about
    AaddCategory(params){
      return http.post(window.VUE_APP_BASE_URL+`AboutController/addCategory`,{
        mark:params.mark,
        name:params.name,
        pid:params.pid,
      })
    },
    //查看内容about
    AcheckContent(id){
      return http.get(window.VUE_APP_BASE_URL+`AboutController/checkContent?type=${id}`)
    },
    //编辑内容about
    AeditContent(params){
      return http.post(window.VUE_APP_BASE_URL+`AboutController/editContent`,{
        content:params.content,
        type:params.id,
      })
    },
    doLogin(data){
      return http.post(window.VUE_APP_BASE_URL+`login`,data)
    }
};
